<template>
    <div id="demo1">
    </div>
</template>

<script>
  import *as echarts from 'echarts'
    export default {
        name: "demo"
    }
    let mCharts = echarts.init(document.getElementById("demo1"));
    let xDataArr = ['张三','里斯','王五','赵六'];
    let yDataArr = [88,92,99,32];
    let option = {
      title: {
        text: '人均体重',
        textStyle: {
          color: 'blue'
        },
        borderWidth: 5,
        borderColor: 'blue',
        borderRadius: 5,
        left: 30,
        top: 30
      },
      xAxis: {
        type: 'category',
        data: xDataArr
      },
      yAxis: {
        type:'value'
      },
      series: [
        {
          name:"体重（公斤）",
          type: 'bar',
          data:yDataArr
        }
      ]
    };
    mCharts.setOption(option)
</script>

<style scoped>
  #demo1{
    width: 50%;
    height: 500px;
    border: 1px solid blanchedalmond;
    margin-left: 20px;
  }
</style>
